<template >
    <div>
        <div style="text-align: right">
            <el-input placeholder="请输入内容" v-model="value" style="width: 30%; margin-bottom: 15px">
                <template slot="append">
                    <el-button type="primary">查询</el-button>
                </template>
            </el-input>
        </div>
        <comm-table
            ref="table"
            :columns="columns"
            url="https://www.fastmock.site/mock/d45b9e67f495e3b24d522b72efc251ec/easy-mock/table/data"
            @select="onSelectionChange"
            @selectAll="(rows) => onSelectAll(rows, $refs.table.$refs.table.renderData)"
            @changeData="(val) => handleSelect(val)"
        />
        <div v-footer>
            <el-button type="primary" @click="onRelate">关联</el-button>
            <el-button @click="() => $emit('close')">关闭</el-button>
        </div>
    </div>
</template>
<script>
import tableSelect from "@/mixin/tableSelect";
export default {
    name: "InfoModal",
    mixins: [tableSelect],
    data() {
        return {
            value: "",
            columns: [
                { label: "", type: "selection", width: 80 },
                { label: "序号", type: "index", width: 70 },
                { label: "信息编号", prop: "yyxtmc", width: 200 },
                { label: "标题", prop: "title" },
                { label: "上报时间", prop: "time" },
                { label: "上报单位", prop: "danwei" }
            ]
        };
    },
    methods: {
        /**
         * 关联
         */
        onRelate() {
            console.log(this.multipleSelection);
        }
    }
};
</script>
